from lib.ZLoadJson import ZLoadJson
from lib.res.glo import SRC


class Player ( object ) :
	def __init__ ( self ) :
		super ( Player , self ).__init__ ( )
		data = ZLoadJson ( SRC [ 'data' ] [ 'char' ] [ 'enemy' ] [ 0 ] )
		self.parm = {}
		self.item = {}
		self.skill = {}
		self.name = ''
		self.icon = {}
		if data :
			self.init ( data )
		else :
			print 'Load Error'

	def init ( self , data ) :
		self.parm['hp'] = data['hp']
		self.parm['js'] = data['js']
		self.parm['mp'] = data['mp']
		self.parm['ad'] = data['ad']
		self.item = data['item']
		self.skill = data['skill']
		self.name = data['name']
		self.icon['big'] = data['icon-big']
		self.icon['small'] = data['icon-small']